package com.example.day1.common;
//工具类
//用于保存和获取当前用户登录的id
//作用范围为某一个线程之内
public class BaseContent {
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    public static void setCurrentId(Long id){
        threadLocal.set(id);

    }
    public static Long getCurrentId(){
       return threadLocal.get();
    }

}
